import os
import time
#1. the file and directories to be backed-up are specified in a List.#
source = ['C:\\DOCS', 'C:\\Users\HAYWHY\Downloads\Python']

#We use double quotes for strings with spaces in them.#

#2. The backup will be stored in a main backup directory.#
target_dir = 'E:\\MY_python_Backup'

#3. the files will be backed up to a zip folder.#
#4. the name of the zip achive is the current date and time.#
target = target_dir + os.sep + time.strftime('%Y%m%d%H%M%S') + '.zip'

#5. We use the zip command to put the files in a zip achive #
zip_command = "zip -r {0} {1}".format(target, ' '.join(source))

#6. Now we run the backup #
if os.system(zip_command) == 0:
    print('successful backup to', target)
else:
    print('Backup failed')
